package array;

/**
 * Java标准库中array的使用
 */
public class JavaLangArray {
    public static void main(String[] args) {
        int[] arr = new int[10];//在开辟空间的时候必须设定其大小
        for (int i = 0; i < arr.length; i++) arr[i] = i;
        int[] scores = new int[]{100, 99, 66};
        for (int i = 0; i < scores.length; i++) System.out.println("scores  " + i + "=" + +scores[i]);
        for (int score : scores)
            System.out.println("score = " + score);
        scores[0] = 12;
        for (int score : scores)
            System.out.println("score = " + score);
    }
}
